package io.bigbird0101.pay.business.service.controller;

import io.bigbird0101.pay.business.service.dto.PayOrderDto;
import io.bigbird0101.pay.business.service.impl.PayOrderService;
import io.bigbird0101.pay.business.service.vo.PayOrderVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author bigbird-0101
 * @date 2024-04-11 22:52
 */
@RestController("/pay-order")
@RequiredArgsConstructor
public class PayOrderController {
    private final PayOrderService payOrderService;
    @PostMapping
    public PayOrderVo createPayOrder(PayOrderDto payOrder) {
        return payOrderService.createPayOrder(payOrder);
    }
    @GetMapping
    public PayOrderVo getPayOrderById(Long id) {
        return payOrderService.getPayOrderById(id);
    }
}
